<layout name='Layout/layout_page' />

<script type="text/javascript">
$(function(){
	$(".group-list").each(function(){
		var _that=this;
		$(_that).find(".hd").find("input").click(function(){
			if(this.checked){
				$(_that).find("input").prop("checked",true);
			}else{
				$(_that).find("input").prop("checked",false);
			}
		});
		
	});
});
</script>


	<ol class="breadcrumb">
		<li><a href="<{:U('Group/index')}>">用户组管理</a></li>
      	<li class="active">【<{$name}>】权限设置</li>
    </ol>

	<form action="<{:U('Group/access')}>" method="post" class="form-horizontal">
	
	<volist name="list" id="vo">
	<div class="group-list">
		<div class="hd"><input type="checkbox" name="mod[]" value="<{$vo.id}>-<{$vo.level}>-<{$vo.pid}>" <php>if(in_array($vo['id'],$nodeArr)) echo 'checked';</php>/>
			<{$vo.title}>
		</div>
			
		<div class="action">
			<ul>
			<volist name="vo['child']" id="f">
		    <li>
		    	<div class="checkbox">
		    		<label>
					<input type="checkbox" name="mod[]" value="<{$f.id}>-<{$f.level}>-<{$f.pid}>" <php>if(in_array($f['id'],$nodeArr)) echo 'checked';</php>/>
					<{$f.title}>
					</label>
				</div>
			</li>
		    </volist>
			</ul>
		</div>
	</div>
	</volist>
	
    <p><button type="submit" class="btn btn-info"><i class="icon-edit icon-white"></i> 保存</button></p>

	<input type="hidden" name="role_id" value="<{$id}>" />
	</form>

<input type="hidden" id="menu_action" value="sys" />
